<?php

class Register{
	
	protected static $objects = array();
	
	public static function set($name,$obj){
		if(empty(self::$objects[$name])){
			self::$objects[$name] = $obj;
		}
	}
	
	public static function get($name){
		return self::$objects[$name];
	}
	
	public static function _unset($name){
		unset(self::$objects[$name]);
	}
}

Register::set('conf',array('dbhost'=>'127.0.0.1','dbname'=>'shop','dbuser'=>'root','dbpwd'=>'root'));
var_dump(Register::get('conf'));

?>